package com.xianxing.search.controller;


import com.xianxing.common.util.Response;
import com.xianxing.search.service.ESManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manage")
public class ESManageController {
    @Autowired
    ESManagerService esManagerService;

    @RequestMapping("/create")
    public Response createIndex() {
        esManagerService.create();
        return Response.OK("创建成功");
    }

    @RequestMapping("/importAll")
    public Response importAll() {
        esManagerService.importAll();
        return Response.OK("导入全部成功");
    }
}
